<template>

    <!-- 添加或修改对话框 -->
    <lam-dialog title="订单物流信息" :visible.sync="open" width="600px" append-to-body @close="cancel">
      <el-form :ref="formRef" :model="form" :rules="rules" label-width="80px" :disabled="formDisabled">
        <el-row>
          <el-col :span="12">
            <el-form-item label="快递公司" >
              <a v-if="form.companyHomeUrl" target="_blank" class="a-href" :href="form.companyHomeUrl">{{form.dvyName}}</a>
              <span v-else>{{form.dvyName}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="快递单号">
              <span>{{dvyFlowNo}}</span>
              <a v-if="form.queryUrl" target="_blank222" class="a-href" :href="form.queryUrl" style="margin-left: 5px;">去官网查询</a>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div v-if="form.queryUrl">
        <iframe :src="form.queryUrl" style="height: 450px;width: 100%;border: none;"></iframe>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancel" type="primary">关  闭</el-button>
      </div>
    </lam-dialog>

</template>

<script>
import { EditMixin } from '@/components/mixins/EditMixin';

export default {
  name: "OrderDevyInfo",
  data() {
    return {
      open: false,
      url: {
        base: '/mall/delivery/dvyInfo',
      },
      dvyId: '',
      dvyFlowNo: '',
      form: {},
      dvyFlowList:[]

    };
  },
  created() {
  },
  methods: {
    // 表单重置
    reset() {
      this.form = { };
    },
    show(dvyId, dvyFlowNo){
      this.dvyId = dvyId;
      this.dvyFlowNo = dvyFlowNo;
      this.open = true;
      this.getData(dvyId, dvyFlowNo);
    },

    getData(dvyId, dvyFlowNo){
      this.$httpGet(this.url.base, {id: dvyId, dvyFlowNo: dvyFlowNo}).then(res=>{
        this.form = res.data;
      })
    },

    cancel(){
      this.open = false;
    },


  }
};
</script>
<style scoped>
  .a-href {
    color: blue !important;
    cursor: pointer !important;
    text-decoration: underline !important;
  }
</style>
